package ioc14;

import org.springframework.beans.factory.FactoryBean;

import java.util.Calendar;
import java.util.Date;

public class SomeBean implements FactoryBean {
    @Override
    public Object getObject() throws Exception {
        Calendar c = Calendar.getInstance();
        Date time = c.getTime();
        return time;
    }

    @Override
    public Class<?> getObjectType() {
        return Date.class;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
